package com.zzw.service.Impl;

import com.zzw.bean.AiMedia;
import com.zzw.dao.AiMediaMapper;
import com.zzw.service.AiMediaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * AI媒体服务实现类
 * @author 赵志伟
 * @version 1.0
 */
@Service
public class AiMediaServiceImpl implements AiMediaService {

    @Autowired
    private AiMediaMapper aiMediaMapper;

    @Override
    public int saveAiMedia(AiMedia aiMedia) {
        return aiMediaMapper.insertAiMedia(aiMedia);
    }

    @Override
    public int updateAiMedia(AiMedia aiMedia) {
        return aiMediaMapper.updateAiMedia(aiMedia);
    }

    @Override
    public AiMedia getAiMediaById(Integer id) {
        return aiMediaMapper.selectAiMediaById(id);
    }

    @Override
    public AiMedia getAiMediaByRequestId(String requestId) {
        return aiMediaMapper.selectAiMediaByRequestId(requestId);
    }

    @Override
    public List<AiMedia> getAiMediaList(AiMedia aiMedia) {
        return aiMediaMapper.selectAiMediaList(aiMedia);
    }
    
    @Override
    public int deleteAiMediaById(Integer id) {
        return aiMediaMapper.deleteAiMediaById(id);
    }
    
    @Override
    public int batchDeleteAiMedia(Integer[] ids) {
        return aiMediaMapper.deleteAiMediaByIds(ids);
    }
}
